package drds.common.db.xml_mapping.parsing;

import java.util.Properties;

class VariableTokenHandler implements TokenHandler {
  private final Properties variables;

  VariableTokenHandler(Properties variables) {
    this.variables = variables;
  }

  @Override
  public String handleToken(String key) {
    if (variables != null) {
      if (variables.containsKey(key)) {
        return variables.getProperty(key);
      }
    }
    return "${" + key + "}";//keep
  }
}
